package io.renren.modules.generator.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.modules.generator.dao.GradeclassDao;
import io.renren.modules.generator.entity.GradeclassEntity;
import io.renren.modules.generator.service.GradeclassService;
import io.renren.util.UUIDUtil;



@Service("gradeclassService")
public class GradeclassServiceImpl implements GradeclassService {
	@Autowired
	private GradeclassDao gradeclassDao;
	
	@Override
	public GradeclassEntity queryObject(String gradeclassno){
		return gradeclassDao.queryObject(gradeclassno);
	}
	
	@Override
	public List<GradeclassEntity> queryList(Map<String, Object> map){
		return gradeclassDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return gradeclassDao.queryTotal(map);
	}
	
	@Override
	public void save(GradeclassEntity gradeclass){
		gradeclass.setGradeclassno(UUIDUtil.getOrderIdByUUId());
		gradeclassDao.save(gradeclass);
	}
	
	@Override
	public void update(GradeclassEntity gradeclass){
		gradeclassDao.update(gradeclass);
	}
	
	@Override
	public void delete(String gradeclassno){
		gradeclassDao.delete(gradeclassno);
	}
	
	@Override
	public void deleteBatch(String[] gradeclassnos){
		gradeclassDao.deleteBatch(gradeclassnos);
	}
	
}
